﻿@{
    ViewBag.Title = "Common Command";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<ol class="breadcrumb">
    <li><a href="/Home/Home">Home</a></li>
    <li><a href="/Common/CommonIntoduction"> Sanelib Common</a></li>
    <li class="active">View</li>
</ol>
           
<div id="introduction">
    <h1 class="text-left">Views</h1>
    <p>View is also called RenderData.View is implement By IView and IAuditedView . IAuditedView that is Monitoring when User is performed Operation . IAuditedView is extend by IView . In View Field that is same as Database.IRepositoryView is Used only View.<br/></p>
    <pre><code>public interface IAuditedView : IView<br/>{ <br/>Guid? UserId { get; set; }<br/>int RevisionNumber { get; set; }<br/>DateTime? OperationTime { get; set; }<br/>}</code></pre>
    <p>IAuditedView Interface extend by IView.IAuditedView that Contains Three Property UserId type Of Guid,Second RivisionNumber type of integer,third OperationType of DateTime.This can be performed when Member Performed Some Operation.</p>
    <pre><code>public interface IView<br />{<br/>Guid Id { get; set; }<br/>} </code></pre>
    In Above Example IView Interface has contains only Guid that is generating 32-bit UniqueId.
    <pre><code>[TableName("Health")]<br/>public class HealthView : IView<br/>{<br/>public Guid Id { get; set; }<br/>public string Type { get; set; }<br/>public string Value { get; set; }<br/>[JsonIgnore]<br/>public DateTime? HealthCheckDateTime { get; set; }<br/>public string HealthCheckDateTimeString { get { return HealthCheckDateTime.GetValueOrDefault().ToString(CultureInfo.InvariantCulture); }<br/>}<br/>}</code></pre>
    <p>In Above Example of HealthView Fetch Record From HealthTable.And that Contains Id,Type and Value.</p>
    <pre><code>[JsonIgnore]<br/>public DateTime? HealthCheckDateTime { get; set; }<br/>public string HealthCheckDateTimeString { get { return HealthCheckDateTime.GetValueOrDefault().ToString(CultureInfo.InvariantCulture); } }</code></pre>
    <strong>JSonIgnoreAttribute</strong><br/>Instructs the JsonSerializer not to serialize the public field or public read/write property value.in namespace Newtonsoft.Json.In Example HealthcheckDateTime that type of DateTime and To Convert Into String using JSonIgnore Attribute that Ignore type Of Property.
    <p>Views that contains MemberView, TaskLogView, TrackLogView. Only MemberView that is extend By IAuditedView All Other Extend by IView .</p>
</div>

       